package com.ofood.springcloud.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author : Jack Gao
 * @version V1.0
 * @Project: ofood-springcloud
 * @Package com.ofood.springcloud.controller
 * @Description: TODO
 * @date Date : 2021年04月01日 4:13 PM
 */

@RefreshScope
@RestController
public class ConfigController {
    @Value("${test.info}")
    private String config;

    @GetMapping("/config")
    public String getConfigByConfigServer(){
        return config;
    }
}
